package com.example.dml.strategy_pattern;

import com.example.dml.strategy_pattern.improve.PromotionStrategyFactory;
import com.example.dml.strategy_pattern.normal.CashbackStrategy;
import com.example.dml.strategy_pattern.normal.CouponStrategy;
import com.example.dml.strategy_pattern.normal.PromotionActivity;

/**
 * @description:
 * @author: gaoyang
 * @date: 2021/10/28 21:20
 */
public class StrategyTest {

    public static void main(String[] args) {
//        PromotionActivity activity618 = new PromotionActivity(new CouponStrategy());
//        PromotionActivity activity1111 = new PromotionActivity(new CashbackStrategy());
//        activity618.excute();
//        activity1111.excute();

        String primotionKey = "GROUPBUY";
        PromotionActivity activity = new PromotionActivity(PromotionStrategyFactory.getNonPromotionStrategy(primotionKey));
        activity.excute();
    }
}
